package net.chenlin.dp.modules.newBusiness.controller;

import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
import net.chenlin.dp.common.entity.R;
import net.chenlin.dp.modules.newBusiness.entity.dto.DayCountDto;
import net.chenlin.dp.modules.newBusiness.entity.dto.TrendChartDto;
import net.chenlin.dp.modules.newBusiness.service.DeviceCountService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;

/**
 * @Author: Yansgm
 * @Description:
 * @Date: 2025-04-27 15:37:17
 */
@Slf4j
@RestController
@RequestMapping("/statistics")
@Api(tags = "ysm-新版-监测设备数据统计")
public class DeviceCountController {

    @Autowired
    private DeviceCountService service;

    @RequestMapping(value = "/dayCount", method = RequestMethod.POST)
    @ApiOperation(value = "监测设备日统计数据")
    public R getdayCount(@RequestBody DayCountDto dto) {
        return service.getdayCount(dto);
    }

    @RequestMapping(value = "/trendChart", method = RequestMethod.POST)
    @ApiOperation(value = "走势图")
    public R getTrendChart(@RequestBody TrendChartDto dto) {
        return service.getTrendChart(dto);
    }
}
